Skip to content

aggregator: age date-only freshness stamps by the Chicago calendar day (#1629) - #3030

Merged
dezren39 merged 1 commit into
mainfrom
queue/4064-1629-freshness-chicago-day
Oct 31, 2026
Merged

dezren39 merged 1 commit into
mainfrom
queue/4064-1629-freshness-chicago-day

Conversation

@dezren39

@dezren39 dezren39 commented Oct 31, 2026 •

Copy link
Copy Markdown
Member

Closes #1629. Queue task 4064 (repo-health-code-pilot).

freshness() in pm-stack/aggregator/src/derive.ts aged date-only stamps against the UTC calendar day, so a read dated today (Chicago) reported ageDays 1 — and stale at cadence 0 — from 19:00 Chicago onward, when UTC had rolled over and Chicago had not.

Fix: the date-only branch now takes "today" from the existing chicagoYmd(now) helper (America/Chicago, the timezone every other calendar helper in the file uses) instead of now's UTC date. The stamp itself is a timezone-less calendar date, so the day difference is calendar-date minus calendar-date; the #1568 future-tolerance bound is unchanged in shape (more than one day past today's Chicago date = unknown age). Datetime stamps are untouched (elapsed whole days).

Tests: new boundary test in test/usage.test.ts — CDT evening (19:30 CDT = next UTC day), 23:59 CDT, and the CST-evening equivalent all report a today-dated stamp as age 0 and yesterday's as 1, with stale verdicts following cadenceDays from the Chicago-day age; tomorrow's Chicago date stays within tolerance. All pre-existing freshness tests pass unchanged.

Laptop verification: bun test test/usage.test.ts 32/32; full aggregator suite 557 pass / 7 fail, the 7 being the pre-existing page-manifest/render failures also present on clean main; tsc --noEmit shows no errors in the touched files (pre-existing test-file errors elsewhere unchanged).

🤖 Queue worker lane E, task 4064.


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need.

@dezren39
dezren39 requested a review from a team as a code owner October 31, 2026 11:05
@coderabbitai

coderabbitai Bot commented Oct 31, 2026

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 29 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 88850c30-e726-417c-b1de-af461c514ad6
Commits

Reviewing files that changed from the base of the PR and between 27940ab and 40c3cb8.

Files selected for processing: 2
  • pm-stack/aggregator/src/derive.ts
  • pm-stack/aggregator/test/usage.test.ts
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 31, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-31T11:06:33.361645Z 40c3cb8 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

aggregator: freshness() ages date-only stamps by the UTC day, not Chicago — a read dated today reports '1d ago' (and stale) from 19:00 Chicago onward

1 participant